package com.tbit.uqbike.object.pojo.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.math.BigDecimal;

/**
 * 用户购卡订单统计
 *
 * @Author:BUGTian
 * @DATE: 2022/11/12
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class PayCardLogSumVO {
    /**
     * 用户购卡金额
     */
    private Double userByCardMoney;
    /**
     * 用户购卡笔数
     */
    private Integer userByCardCount;
    /**
     * 骑行卡金额
     */
    private Double rideCardMoney;
    /**
     * 骑行卡笔数
     */
    private Integer rideCardCount;
    /**
     * 会员卡金额
     */
    private Double vipCardMoney;
    /**
     * 会员卡笔数
     */
    private Integer vipCardCount;
    /**
     * 免押卡金额
     */
    private Double depositCardMoney;
    /**
     * 免押卡笔数
     */
    private Integer depositCardCount;
    /**
     * 优惠券套餐金额
     */
    private Double couponMealMoney;
    /**
     * 优惠券套餐笔数
     */
    private Integer couponMealCount;

    public void compute() {
        userByCardMoney = new BigDecimal(rideCardMoney.toString()).add(new BigDecimal(vipCardMoney.toString())).add(new BigDecimal(depositCardMoney.toString())).add(new BigDecimal(couponMealMoney.toString())).doubleValue();
        //userByCardMoney = rideCardMoney + vipCardMoney + depositCardMoney + couponMealMoney;
        userByCardCount = rideCardCount + vipCardCount + depositCardCount + couponMealCount;
    }
}
